package com.zz.cc.owner.app;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.TextView;
import android.widget.CompoundButton.OnCheckedChangeListener;

import com.zz.cc.owner.R;
import com.zz.cc.owner.TitleBaseActivity;

public class ReserveActivity extends TitleBaseActivity implements OnClickListener, OnCheckedChangeListener {
	
	private RadioButton m50Radio;
	private RadioButton m100Radio;
	private RadioButton m1000Radio;

	private EditText mSearchInput;
	private Button mSearchSubmit;
	
	private EditText mRechargeInput;
	private Button mRechargeSubmit;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_reserve);
		initUI();
		fillView();
	}

private void initUI() {
	m50Radio = (RadioButton) findViewById(R.id.reserve_destination_50_metre);
	m100Radio = (RadioButton) findViewById(R.id.reserve_destination_100_metre);
	m1000Radio = (RadioButton) findViewById(R.id.reserve_destination_1000_metre);
	
	mSearchInput = (EditText) findViewById(R.id.reserve_search_input);
	mSearchSubmit = (Button) findViewById(R.id.reserve_search_submit);
	
	mRechargeInput = (EditText) findViewById(R.id.reserve_pre_recharge_input);
	mRechargeSubmit = (Button) findViewById(R.id.reserve_recharge_submit);
}

	private void fillView() {
		super.setCurrentTitle(R.string.reserve_title);
		mSearchSubmit.setOnClickListener(this);
		mRechargeSubmit.setOnClickListener(this);
		
		m50Radio.setOnCheckedChangeListener(this);
		m100Radio.setOnCheckedChangeListener(this);
		m1000Radio.setOnCheckedChangeListener(this);
	}

	@Override
	public void onCheckedChanged(CompoundButton btn, boolean check) {
		// TODO
		
	}

	@Override
	public void onClick(View view) {
		int id = view.getId();
		if(id == R.id.reserve_recharge_submit) {
			onBackPressed();
		}
		
	}
}